package conqueror.com.acc2;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class CarReceiver extends BroadcastReceiver {
    public CarReceiver() {
    }

    private static final String TAG = CarReceiver.class.getName();

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.e(TAG, "------------------" + intent.getAction());
        if (intent.getAction().equals("com.conqueror.parkingMonitoring")) {
            Intent mainIntent = new Intent(context, MainActivity.class);  // 要启动的Activity
            mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(mainIntent);
        }
    }
}
